//
//  StaffBaseTableViewCell.m
//  AppHelpStaff
//
//  Created by Zheng on 2018/7/10.
//  Copyright © 2018年 app.help.staff.zhengcx. All rights reserved.
//

#import "StaffBaseTableViewCell.h"

@implementation StaffBaseTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self createSubviews];
        [self layoutSubviewsInView];
    }
    return self;
}

#pragma mark - Subviews
#pragma amrk layout subviews
- (void)layoutSubviewsInView {
    
    [_bgImgv mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(kScale(15));
        make.right.mas_equalTo(-kScale(15));
        make.height.mas_equalTo(kScale(110));
        make.centerY.equalTo(self);
    }];
}

#pragma mark create subviews
- (void)createSubviews {
    [self.contentView addSubview:self.bgImgv];
    
}

- (UIImageView *)bgImgv {
    if (!_bgImgv) {
        _bgImgv = [[UIImageView alloc] init];
        _bgImgv.userInteractionEnabled = YES;
    }
    return _bgImgv;
}

@end
